import request from '@/utils/request'

export function getUserList() {
    return request({
        url: '/sys/user/list',
        method: 'post'
    })
}

export function getOneUser(userId) {
    return request({
        url: '/sys/user/' + userId,
        method: 'get'
    })
}

export function createUser(data) {
    return request({
        url: '/sys/user',
        method: 'post',
        data
    })
}

export function updateUser(data) {
    return request({
        url: '/sys/user',
        method: 'put',
        data
    })
}

export function deleteUser(userId) {
    return request({
        url: '/sys/user/' + userId,
        method: 'delete'
    })
}